package cn.miao.client;

import cn.miao.doc.CourseDoc;
import cn.miao.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 调用course课程的fegin接口
 *
 * @author MiaoDaWei
 * @date 2021/11/27
 */
@FeignClient(value = "SERVICE-SEARCH" ,fallbackFactory = CourseESFeignClientFallbackFactory.class )
@RequestMapping("/course")
public interface CourseESFeginClient {
    /**
     * 保存或更新
     *
     * @param courseDoc 当然医生
     * @return {@link AjaxResult}
     */
    @PostMapping("/es/save")
    public AjaxResult save(@RequestBody CourseDoc courseDoc);


    /**
     * 删除
     *
     * @param id id
     * @return {@link AjaxResult}
     */
    @GetMapping("/es/del")
    public AjaxResult remove(@RequestParam Long id);

    /**
     * 搜索
     *
     * @param id id
     * @return {@link AjaxResult}
     */
    @GetMapping("/es/searchOne")
    public AjaxResult search(@RequestParam Long id);
}
